package gamePlus.server;

import java.io.Serializable;

@SuppressWarnings("serial")
public class GameClientSlot implements Serializable{
	public enum SlotState {
		SS_OPEN(0), SS_LOCKED(1), SS_OCCUPIED_HUMAN(2), SS_OCCUPIED_CPU(3);
		private final int value;
	    private SlotState(int value) {
	        this.value = value;
	    }
	    public int getValue() {
	        return value;
	    }
	}
	
	private transient GameClientHandler clientHandler;
	private SlotState slotState;
	private boolean readyToPlay;
	private String playerName;
	private boolean readyToStartRound = false;
	
	public GameClientSlot() {
		clientHandler=null;
		readyToPlay=false;
		slotState = SlotState.SS_OPEN;
	}
	public GameClientHandler getClientHandler() {
		return clientHandler;
	}
	public void setClientHandler(GameClientHandler clientHandler) {
		this.clientHandler = clientHandler;
	}
	public SlotState getSlotState() {
		return slotState;
	}
	public void setSlotState(SlotState slotState) {
		this.slotState = slotState;
	}
	public void setReady(boolean b) {
		readyToPlay = b;
	}
	public String getPlayerName() {
		return playerName;
	}
	public void setPlayerName(String playerName) {
		this.playerName = playerName;
	}
	
	public boolean isReadyToPlay() {
		return readyToPlay;
	}
	void setReadyToStartRound(boolean b) {
		readyToStartRound=b;
	}
	boolean isReadyToStartRound() {
		return readyToStartRound;
	}
}
